<html><head><title>ReadProgramString</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">ReadProgramString()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result$ = <font color="#006666"><b>ReadProgramString</b></font>(Program [, Flags])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Reads a line from the output (stdout) of the given program. 
This function waits until there is data available to read from the program. To prevent this wait, 
<a href="availableprogramoutput.html">AvailableProgramOutput()</a> may be used first to check if there is 
something to read. This function also waits until a full line of output is available. If not line-based 
or raw output is to be read, <a href="readprogramdata.html">ReadProgramData()</a> may be used. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Program</i></td>
<td width="90%"> 
The program to use. It must have been started before with <a href="runprogram.html">RunProgram()</a> and the <font color="#924B72">#PB_Program_Read</font> flag. 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
The string format to use when reading the output. This can be one of the following values: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Ascii</font>  : Reads the output as ascii
  <font color="#924B72">#PB_UTF8</font>   : Reads the output as UTF8
  <font color="#924B72">#PB_Unicode</font>: Reads the output as <a href="../reference/unicode.html">unicode</a>
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

A string created from program output. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="readprogramdata.html">ReadProgramData()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=readprogramerror.html>ReadProgramError()</a> - <a href=index.html>Process Index</a> - <a href=removeenvironmentvariable.html>RemoveEnvironmentVariable()</a> ->

</body></html>